﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="detail.aspx.vb" Inherits="Audiwiki.detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="AudiDB">
            <Columns>
                <asp:BoundField DataField="Range" HeaderText="Range" SortExpression="Range">
                </asp:BoundField>
                <asp:BoundField DataField="ModelName" HeaderText="ModelName" 
                    SortExpression="ModelName"></asp:BoundField>
                <asp:BoundField DataField="ModelYear" HeaderText="ModelYear" 
                    SortExpression="ModelYear"></asp:BoundField>
                <asp:BoundField DataField="Color" HeaderText="Color" SortExpression="Color">
                </asp:BoundField>
                <asp:BoundField DataField="Engine" HeaderText="Engine" SortExpression="Engine">
                </asp:BoundField>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Photo">
                    <ControlStyle Height="100px" Width="100px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="AudiDB" runat="server" 
            ConnectionString="<%$ ConnectionStrings:AudiCon %>" 
            ProviderName="<%$ ConnectionStrings:AudiCon.ProviderName %>" 
            SelectCommand="SELECT * FROM [Ranges] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" 
                    SortExpression="Author" />
                <asp:BoundField DataField="Titles" HeaderText="Titles" 
                    SortExpression="Titles" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" 
                    SortExpression="Comment" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:AudiCon %>" 
            ProviderName="<%$ ConnectionStrings:AudiCon.ProviderName %>" 
            
            SelectCommand="SELECT [Author], [Titles], [Comment] FROM [Comments] WHERE ([Audi_fk] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Audi_fk" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        Add your comment about this Audi:</p>
    <p>
        Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </p>
    <p>
        Comment title:&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    </p>
    <p>
        Your Comment:&nbsp;&nbsp;
        <asp:TextBox ID="TextBox3" runat="server" Height="86px" Width="480px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Add Comment" />
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            DataSourceID="SqlDataSource2" DataTextField="Tag" DataValueField="ID" 
            RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:AudiCon %>" 
            ProviderName="<%$ ConnectionStrings:AudiCon.ProviderName %>" 
            SelectCommand="SELECT * FROM [Tag]"></asp:SqlDataSource>
        <asp:Button ID="Button2" runat="server" Text="Tag This Audi" />
    </p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>
